<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<script type="text/javascript">

	function sendForm(flag){
		/*
		var id = document.getElementById("id");
		var password = document.getElementById("password");
		
		if(id.value==""){
			alert("ID를 입력하세요.");
			return false;
		}else if(password.value==""){
			alert("패스워드를 입력하세요.");
			return false;
		}
		*/
		
		var form1 = document.getElementById("form1");
		
		if(flag=='login'){
			var id = document.getElementById("id");
			var password = document.getElementById("password");
			
			if(id.value==""){
				alert("ID를 입력하세요.");
				return false;
			}else if(password.value==""){
				alert("패스워드를 입력하세요.");
				return false;
			}
			form1.action="${initParam.rootPath }/member/login.do";
		}else if(flag=='join'){
			form1.action = "${initParam.rootPath}/member/join_form.jsp";
		}
		form1.submit();
	}
</script>

<h3 align="right">
	<form action="${initParam.rootPath }/member/login.do" name="loginform" id="form1" method="post">
		<tr><td>ID:<input type="text" id="id" name="id" size="5"></td></tr>
		<tr><td>PW:<input type="password" id="password" name="password"size="5"></td></tr>
		<img src="/world/image/main/로그인E.jpg" onclick="sendForm('login')" style='cursor:pointer' />
		<img src="/world/image/main/회원가입E.jpg" onclick="sendForm('join')" style='cursor:pointer' />
		
	</form>
	

</h3>
